﻿@model JPSOFTWARE.BON.Modelos.AlterarSenhaModel
@{
    ViewBag.Title = "AlterarSenha";
    Layout = "~/Views/Shared/_Layout.cshtml";
}
<script src="@Url.Content("~/Scripts/Login.js")" type="text/javascript"></script>
<script type="text/javascript">
    jQuery(function ($) {
        AlterarSenha();
    });
</script>
<div class="span3"></div>
    <div class="span6 box">
        <div class="box-head">
            <h3>Alterar Senha</h3>
        </div>
        <div class="box-content">
            <div class="content-inner">
                <div class="form-horizontal">
                    @using (Html.BeginForm("AlterarSenha", "Login", FormMethod.Post))
                    {
                        @Html.Hidden("hAlterarSenha", ViewData["AlterarSenha"])
                        @Html.Hidden("hAlterarSenhaErro", ViewData["AlterarSenhaErro"])

                        @Html.ValidationSummary(true)
                        <fieldset>
                            <div class="control-group">
                                <div class="control-label">
                                    @Html.LabelFor(model => model.SenhaAtual)
                                </div>
                                <div class="controls">
                                    @Html.EditorFor(model => model.SenhaAtual)
                                    @Html.ValidationMessageFor(model => model.SenhaAtual)
                                </div>
                            </div>
                            <div class="control-group">
                                <div class="control-label">
                                    @Html.LabelFor(model => model.NovaSenha)
                                </div>
                                <div class="controls">
                                    @Html.EditorFor(model => model.NovaSenha)
                                    @Html.ValidationMessageFor(model => model.NovaSenha)
                                </div>
                            </div>
                            <div class="control-group">
                                <div class="control-label">
                                    @Html.LabelFor(model => model.ConfirmaSenha)
                                </div>
                                <div class="controls">
                                    @Html.EditorFor(model => model.ConfirmaSenha)
                                    @Html.ValidationMessageFor(model => model.ConfirmaSenha)
                                </div>
                            </div>
                            <div class="form-actions">
                                <button type="submit" class="btn btn-primary" title="Alterar Senha"><i class="icon-ok icon-white"></i>&nbsp;Alterar Senha</button>
                                <button type="button" class="btn" title="Cancelar" id="btCancelar"><i class="icon-ban-circle"></i>&nbsp;Cancelar</button>
                            </div>
                        </fieldset>
                    }
                </div>
            </div>
        </div>
    </div>
<div class="span3"></div>
<div id="divAlterarSenhaSucesso" class="modal">
    <div class="modal-header">
        <h3>Alterar Senha</h3>
    </div>
    <div class="modal-body">
        @ViewData["Mensagem"]
    </div>
    <div class="modal-footer">
        @Html.ActionLink("Ok", "ListarUsuario", "Usuario", new { Area = "GestaoUsuario" }, new { @class = "btn btn-primary" })
    </div>
</div>
<div id="divAlterarSenhaErro" class="modal">
    <div class="modal-header">
        <h3>Alterar Senha</h3>
    </div>
    <div class="modal-body">
        @ViewData["Mensagem"]
    </div>
    <div class="modal-footer">
        <span><a class="btn btn-primary" href="javascript:FecharTelaAlterarSenhaErro()">Tentar
            novamente?</a></span>
        <span>@Html.ActionLink("Sair", "ListarUsuario", "Usuario", new { Area = "GestaoUsuario" }, new { @class = "btn" })</span>
    </div>
</div>
<div id="divAlterarSenhaCancelar" class="modal">
    <div class="modal-header">
        <h3>Alterar Senha</h3>
    </div>
    <div class="modal-body">
        @JPSOFTWARE.BON.Modelos.Mensagens.MSG_020
    </div>
    <div class="modal-footer">
        <span>@Html.ActionLink("Sim", "ListarUsuario", "Usuario", new { Area = "GestaoUsuario" }, new { @class = "btn btn-primary" })</span>
        <span><a class="btn" href="javascript:CancelarOperacaoAlterarSenha()">Não</a></span>
    </div>
</div>
